import { reqTrademarkList } from "@/apis/permission"
import { records, TradeMarkResponseData } from "@/types/permission"
import { ref } from "vue"

export const useGetTradeMark = () => {
  const page = ref(1)
  const limit = ref(5)
  const total = ref(10)
  const dataList = ref<records>([])
  const getTradeMarkList = async () => {
    const res: TradeMarkResponseData = await reqTrademarkList(
      page.value,
      limit.value,
    )
    dataList.value = res.data.records
    total.value = res.data.total
  }
  return{
    page,
    limit,
    total,
    dataList,
    getTradeMarkList
  }
}
